/**
 * 
 */
package fr.mynounou.entities;

import java.util.List;

import javax.annotation.Generated;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.PrimaryKeyJoinColumn;

import fr.mynounou.entities.contrats.Contrat;

/**
 * @author btavernier
 *
 */
@SuppressWarnings("serial")
@Entity
@PrimaryKeyJoinColumn(name="ID_CONTACT")
public class Nounou extends Contact implements Utilisateur {
	
	@Column(nullable=false,unique=true)
	String login;
	
	@Column(nullable=false)
	String password;
	
	@OneToMany(mappedBy="nounou")
	List<Contrat> contrats;
	
	@OneToMany(mappedBy="nounou")
	List<Parent> parents;
	
	public Nounou(){
		
	}
	
	public Nounou(String login, String password) {
		this.login=login;
		this.password=password;
	}

	@Override
	public String getLogin() {
		return this.login;
	}

	@Override
	public String getPassword() {
		return this.password;
	}

	/**
	 * @param login the login to set
	 */
	public void setLogin(String login) {
		this.login = login;
	}

	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return the contrats
	 */
	public List<Contrat> getContrats() {
		return contrats;
	}

	/**
	 * @param contrats the contrats to set
	 */
	public void setContrats(List<Contrat> contrats) {
		this.contrats = contrats;
	}

	/**
	 * @return the parents
	 */
	public List<Parent> getParents() {
		return parents;
	}

	/**
	 * @param parents the parents to set
	 */
	public void setParents(List<Parent> parents) {
		this.parents = parents;
	}

}
